#include "CBuilding.h"
#include "Enum.h"

CBuilding::CBuilding(void)
{
	m_nState = eNotDestroy;
}

CBuilding::~CBuilding(void)
{
}

void CBuilding::Hit(int const _nDamage)
{
	m_nHP = m_nHP - (_nDamage - m_nDef);

	if(0 >= m_nHP)
	{
		m_nState = eDestroy;
	}
}

bool CBuilding::GetState(void)
{
	return m_nState;
}

int CBuilding::GetX(void)
{
	return m_nX;
}

int CBuilding::GetY(void)
{
	return m_nY;
}